@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Bootstrap Replacement Styles */
@import 'app/shared/styles/bootstrap-replacement.css';

:root {
  /* Color System */
  --primary-color: #0066CC;
  --primary-hover: #0052A3;
  --primary-light: #E6F2FF;
  --primary-ultra-light: #F5FAFF;
  
  --secondary-color: #6B7280;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  
  --success-color: #10B981;
  --success-hover: #059669;
  --warning-color: #F59E0B;
  --danger-color: #EF4444;
  --danger-hover: #DC2626;
  --info-color: #3B82F6;
  --accent-blue: #4A90E2;
  --accent-light-blue: #60a5fa;
  
  --background: #FFFFFF;
  --background-secondary: #F9FAFB;
  --background-tertiary: #F3F4F6;
  
  --border-color: #E5E7EB;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text-primary);
  background-color: var(--background-secondary);
  line-height: 1.6;
  font-weight: 400;
}

.content-container {
  padding-top: 72px;
}

main {
  position: relative;
  padding-top: 72px;
  min-height: calc(100vh - 72px - 80px); /* Account for navbar and footer */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 10px 0px 20px 0px;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Navigation Bar */
.navbar.navbar-fixed-top {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #000 0%, #475569 100%) !important;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15) !important;
  border-bottom: 1px solid rgba(0, 102, 204, 0.15) !important;
  border: none !important;
  z-index: 1000;
  min-height: 72px;
  transition: all var(--transition-base);
}

.navbar-inner {
  background: transparent;
  padding: 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-header {
  display: flex;
  align-items: center;
  margin: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: white !important;
  font-size: 1.25rem;
  font-weight: 600;
  transition: transform var(--transition-fast);
}

.navbar-brand:hover {
  transform: translateY(-1px);
  color: var(--accent-light-blue) !important;
}

.navbar-brand img {
  height: 36px;
  width: auto;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white !important;
  line-height: normal;
  margin-right: var(--spacing-2xl);
}

.navbar-collapse {
  float: none;
  margin: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  margin: 0;
}

.navbar-fixed-top .nav li a {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.navbar-fixed-top .nav li a:hover {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-fixed-top .nav li.active a {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.navbar-toggle:hover {
  border-color: var(--primary-color);
}

.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 4px 0;
  transition: all var(--transition-fast);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: none;
  letter-spacing: 0.025em;
  line-height: 1.5;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: white;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--background-tertiary);
  border-color: var(--text-light);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: var(--danger-hover);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: var(--success-hover);
  box-shadow: var(--shadow-md);
}

.btn-link {
  background: transparent;
  color: var(--primary-color);
  padding: var(--spacing-xs) var(--spacing-sm);
}

.btn-link:hover {
  color: var(--primary-hover);
  background-color: var(--primary-ultra-light);
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: white;
  transition: all var(--transition-fast);
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-light);
}

/* Tables */
.table {
  width: 100%;
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead {
  background-color: var(--background-tertiary);
}

.table th {
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--transition-fast);
}

.table th:hover {
  background-color: var(--border-color);
}

.table td {
  padding: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: var(--background-secondary);
}

/* Pagination styles removed - now handled by pagination.component.css */

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  border: 1px solid;
  font-size: 0.875rem;
}

.alert-success {
  background-color: #D1FAE5;
  border-color: #A7F3D0;
  color: #065F46;
}

.alert-danger {
  background-color: #FEE2E2;
  border-color: #FECACA;
  color: #991B1B;
}

.alert-warning {
  background-color: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
}

.alert-info {
  background-color: #DBEAFE;
  border-color: #BFDBFE;
  color: #1E40AF;
}

/* Loading Spinner */
.spinner {
  height: 48px;
  width: 48px;
  animation: rotation .6s infinite linear;
  border-left: 3px solid rgba(0, 102, 204, 0.15);
  border-right: 3px solid rgba(0, 102, 204, 0.15);
  border-bottom: 3px solid rgba(0, 102, 204, 0.15);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
}

@keyframes rotation {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* Responsive Utility Classes */
.container-grid,
.container-card {
  padding: var(--spacing-lg);
}

@media (max-width: 768px) {
  .container-grid,
  .container-card {
    padding: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .action-btn.action-btn--small {
    width: 24px;
    height: 24px;
  }
}

/* Global Responsive Styles */
@media (max-width: 768px) {
  .navbar-toggle {
    display: block;
  }
  
  .navbar-collapse[data-collapse="true"] {
    display: none;
  }
  
  .navbar .container {
    flex-wrap: wrap;
  }
  
  .nav {
    flex-direction: column;
    width: 100%;
    margin-top: var(--spacing-md);
  }
  
  .nav li {
    width: 100%;
  }
  
  .nav li a {
    width: 100%;
    justify-content: flex-start;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* Hidden utility */
[hidden] { 
  display: none !important; 
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background-color: var(--primary-light);
  color: var(--text-primary);
}

/* Page Header - Base Styles */
.page-header {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-sm) var(--spacing-lg);
  margin-top: 20px;
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

/* Glyphicon styles removed - rarely used (only 3 occurrences in 1 file) */

/* Common Utility Patterns */

/* Action Buttons - Used across multiple components */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.action-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.action-btn.action-btn--small {
  width: 28px;
  height: 28px;
}

.action-btn.action-btn--view {
  color: var(--info-color);
  border-color: rgba(59, 130, 246, 0.3);
}

.action-btn.action-btn--view:hover {
  background: var(--info-color);
  border-color: var(--info-color);
}

.action-btn.action-btn--edit {
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.3);
}

.action-btn.action-btn--edit:hover {
  background: var(--warning-color);
  border-color: var(--warning-color);
}

.action-btn.action-btn--delete {
  color: var(--danger-color);
  border-color: rgba(239, 68, 68, 0.3);
}

.action-btn.action-btn--delete:hover {
  background: var(--danger-color);
  border-color: var(--danger-color);
}

/* No Records Display - Common pattern */
.no-records {
  text-align: center;
  padding: var(--spacing-3xl);
  color: var(--text-secondary);
}

.no-records-icon {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.no-records h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.no-records p {
  margin: 0;
  color: var(--text-secondary);
}

/* Container Patterns */
.container-grid {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.container-card {
  width: 100%;
  max-width: 1280px;
  margin: 20px auto;
  padding: var(--spacing-md);
}

/* Card Base Styles */
.card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: var(--spacing-md);
  background: var(--background-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.card-body {
  padding: var(--spacing-lg);
}

/* Footer */
.app-footer {
  background: var(--background-tertiary);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-3xl);
}

.footer-content {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-content a {
  color: var(--primary-color);
  font-weight: 500;
}

.footer-content a:hover {
  color: var(--primary-hover);
}